import {BasicApi} from "@/common/BasicApi.ts";
import {Log} from "@/dto/Main/Log.ts";
import Result from "@/common/Result.ts";
import PageVo from "@/common/PageVo.ts";
import SelectVo from "@/common/SelectVo.ts";
import axiosRequest from "@/config/axios.ts";

export class LogApi implements BasicApi<Log, Log, Log>{
    async deleted(sb: Log): Promise<Result<Log>> {
        return await axiosRequest.post("/main/log/deleted",sb);
    }

    async deletedAll(sbList: Array<Log>): Promise<Result<Array<Log>>> {
        return await axiosRequest.post("/main/log/deleted_all",sbList);
    }

    async edit(b: Log): Promise<Result<Log>> {
        return await axiosRequest.post("/main/log/edit",b);
    }

    async editAll(bList: Array<Log>): Promise<Result<Array<Log>>> {
        return await axiosRequest.post("/main/log/edit_all",bList);
    }

    async get(sb: Log): Promise<Result<Log>> {
        return await axiosRequest.post("/main/log/get",sb);
    }

    async listAll(sb: Log): Promise<Result<Array<Log>>> {
        return await axiosRequest.post("/main/log/list_all",sb);
    }

    async option(): Promise<Result<Array<SelectVo<string, number, Log>>>> {
        return await axiosRequest.post("/main/log/option");
    }

    async pageAll(sb: Log): Promise<Result<PageVo<Log>>> {
        return await axiosRequest.post("/main/log/page_all",sb);
    }

}